.class public Lnbisdk/qo;
.super Ljava/lang/Object;


# instance fields
.field private wU:I

.field private xA:Lnbisdk/fx;

.field private xB:Lnbisdk/jt;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method private constructor <init>(Lnbisdk/fx;Lnbisdk/jt;)V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lnbisdk/qo;->xA:Lnbisdk/fx;

    iput-object p2, p0, Lnbisdk/qo;->xB:Lnbisdk/jt;

    invoke-virtual {p1}, Lnbisdk/fx;->size()I

    move-result v0

    iput v0, p0, Lnbisdk/qo;->wU:I

    return-void
.end method

.method public static b(Ljava/util/Vector;Lnbisdk/jt;)V
    .locals 4

    const/4 v3, 0x0

    const/4 v2, 0x1

    new-instance v0, Lnbisdk/qo;

    new-instance v1, Lnbisdk/fx;

    invoke-direct {v1, p0}, Lnbisdk/fx;-><init>(Ljava/util/Vector;)V

    invoke-direct {v0, v1, p1}, Lnbisdk/qo;-><init>(Lnbisdk/fx;Lnbisdk/jt;)V

    iget v1, v0, Lnbisdk/qo;->wU:I

    div-int/lit8 v1, v1, 0x2

    sub-int/2addr v1, v2

    :goto_0
    if-ltz v1, :cond_0

    invoke-direct {v0, v1}, Lnbisdk/qo;->bm(I)V

    add-int/lit8 v1, v1, -0x1

    goto :goto_0

    :cond_0
    :goto_1
    iget v1, v0, Lnbisdk/qo;->wU:I

    if-le v1, v2, :cond_1

    iget v1, v0, Lnbisdk/qo;->wU:I

    sub-int/2addr v1, v2

    iput v1, v0, Lnbisdk/qo;->wU:I

    iget v1, v0, Lnbisdk/qo;->wU:I

    invoke-direct {v0, v3, v1}, Lnbisdk/qo;->h(II)V

    invoke-direct {v0, v3}, Lnbisdk/qo;->bm(I)V

    goto :goto_1

    :cond_1
    return-void
.end method

.method private bm(I)V
    .locals 7

    const/4 v5, 0x1

    mul-int/lit8 v0, p1, 0x2

    add-int/lit8 v0, v0, 0x1

    move v1, p1

    :goto_0
    iget v2, p0, Lnbisdk/qo;->wU:I

    if-ge v0, v2, :cond_1

    add-int/lit8 v2, v0, 0x1

    iget v3, p0, Lnbisdk/qo;->wU:I

    if-ge v2, v3, :cond_0

    iget-object v2, p0, Lnbisdk/qo;->xB:Lnbisdk/jt;

    iget-object v3, p0, Lnbisdk/qo;->xA:Lnbisdk/fx;

    add-int/lit8 v4, v0, 0x1

    invoke-virtual {v3, v4}, Lnbisdk/fx;->X(I)Ljava/lang/Object;

    move-result-object v3

    iget-object v4, p0, Lnbisdk/qo;->xA:Lnbisdk/fx;

    invoke-virtual {v4, v0}, Lnbisdk/fx;->X(I)Ljava/lang/Object;

    move-result-object v4

    invoke-interface {v2, v3, v4}, Lnbisdk/jt;->compare(Ljava/lang/Object;Ljava/lang/Object;)I

    move-result v2

    if-ne v2, v5, :cond_0

    add-int/lit8 v0, v0, 0x1

    :cond_0
    iget-object v2, p0, Lnbisdk/qo;->xB:Lnbisdk/jt;

    iget-object v3, p0, Lnbisdk/qo;->xA:Lnbisdk/fx;

    invoke-virtual {v3, v1}, Lnbisdk/fx;->X(I)Ljava/lang/Object;

    move-result-object v3

    iget-object v4, p0, Lnbisdk/qo;->xA:Lnbisdk/fx;

    invoke-virtual {v4, v0}, Lnbisdk/fx;->X(I)Ljava/lang/Object;

    move-result-object v4

    invoke-interface {v2, v3, v4}, Lnbisdk/jt;->compare(Ljava/lang/Object;Ljava/lang/Object;)I

    move-result v2

    if-eqz v2, :cond_1

    if-ne v2, v5, :cond_2

    :cond_1
    return-void

    :cond_2
    invoke-direct {p0, v1, v0}, Lnbisdk/qo;->h(II)V

    mul-int/lit8 v1, v0, 0x2

    add-int/lit8 v1, v1, 0x1

    move v6, v1

    move v1, v0

    move v0, v6

    goto :goto_0
.end method

.method public static decode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 11
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/UnsupportedEncodingException;
        }
    .end annotation

    const/4 v10, 0x0

    const/16 v9, 0x25

    const/16 v0, 0x2b

    const/16 v1, 0x20

    invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(CC)Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v2

    new-instance v3, Ljava/lang/StringBuffer;

    invoke-direct {v3, v2}, Ljava/lang/StringBuffer;-><init>(I)V

    move v4, v10

    :goto_0
    invoke-virtual {v0, v9, v4}, Ljava/lang/String;->indexOf(II)I

    move-result v5

    if-ltz v5, :cond_4

    invoke-virtual {v0, v4, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move v4, v5

    :goto_1
    add-int/lit8 v6, v4, 0x2

    if-ge v6, v2, :cond_0

    invoke-virtual {v0, v4}, Ljava/lang/String;->charAt(I)C

    move-result v6

    if-ne v6, v9, :cond_0

    add-int/lit8 v4, v4, 0x3

    goto :goto_1

    :cond_0
    if-eqz v1, :cond_1

    array-length v6, v1

    sub-int v7, v4, v5

    div-int/lit8 v7, v7, 0x3

    if-ge v6, v7, :cond_2

    :cond_1
    sub-int v1, v4, v5

    div-int/lit8 v1, v1, 0x3

    new-array v1, v1, [B

    :cond_2
    move v6, v5

    move v5, v10

    :goto_2
    if-ge v6, v4, :cond_3

    add-int/lit8 v7, v6, 0x1

    add-int/lit8 v8, v6, 0x3

    :try_start_0
    invoke-virtual {v0, v7, v8}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v7

    const/16 v8, 0x10

    invoke-static {v7, v8}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;I)I

    move-result v7

    int-to-byte v7, v7

    aput-byte v7, v1, v5
    :try_end_0
    .catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0

    add-int/lit8 v5, v5, 0x1

    add-int/lit8 v6, v6, 0x3

    goto :goto_2

    :catch_0
    move-exception v4

    invoke-virtual {v4}, Ljava/lang/NumberFormatException;->printStackTrace()V

    :cond_3
    new-instance v4, Ljava/lang/String;

    invoke-direct {v4, v1, v10, v5, p1}, Ljava/lang/String;-><init>([BIILjava/lang/String;)V

    invoke-virtual {v3, v4}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    if-ge v6, v2, :cond_6

    invoke-virtual {p0, v6}, Ljava/lang/String;->charAt(I)C

    move-result v4

    if-ne v4, v9, :cond_6

    invoke-virtual {v3, v9}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;

    add-int/lit8 v4, v6, 0x1

    goto :goto_0

    :cond_4
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v1

    if-ge v4, v1, :cond_5

    invoke-virtual {v0, v4}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v3, v0}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    :cond_5
    invoke-virtual {v3}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0

    :cond_6
    move v4, v6

    goto :goto_0
.end method

.method private h(II)V
    .locals 3

    iget-object v0, p0, Lnbisdk/qo;->xA:Lnbisdk/fx;

    invoke-virtual {v0, p1}, Lnbisdk/fx;->X(I)Ljava/lang/Object;

    move-result-object v0

    iget-object v1, p0, Lnbisdk/qo;->xA:Lnbisdk/fx;

    iget-object v2, p0, Lnbisdk/qo;->xA:Lnbisdk/fx;

    invoke-virtual {v2, p2}, Lnbisdk/fx;->X(I)Ljava/lang/Object;

    move-result-object v2

    invoke-virtual {v1, v2, p1}, Lnbisdk/fx;->a(Ljava/lang/Object;I)V

    iget-object v1, p0, Lnbisdk/qo;->xA:Lnbisdk/fx;

    invoke-virtual {v1, v0, p2}, Lnbisdk/fx;->a(Ljava/lang/Object;I)V

    return-void
.end method
